/**
 * 
 */
package org.cuatrovientos.imc;

import java.util.Scanner;

/**
 * @author drodrigo_martinez
 *
 */
public class Imc {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		//Declare variables
		double NumWeight=0f;
		double NumHeight=0f;
		double NumResult=0f;
		double IMC=0f;
		String weight = ""; 
		String height ="";
		
		//Import Scanner
		Scanner reader= new Scanner(System.in);
		
		//Ask for information
		System.out.println("Please enter your weight in kilograms: ");
		weight = reader.nextLine();
		NumWeight = Integer.parseInt(weight);
		
		System.out.println("Please your height in metres: ");
		height = reader.nextLine();
		NumHeight = Double.parseDouble(height);
		
		IMC = (NumWeight/(NumHeight*NumHeight));
		
		//If's and answers depending on the imc
		if(IMC<16){
			System.out.println("You have to eat more");
		}else{
			if(IMC>=16 & IMC<25){
				System.out.println("You are OK");
			}else{
				if(IMC>=25 & IMC<30){
					System.out.println("You have to care more about yourself");
				}else{
					System.out.println("Go to the hospital");
				}
			}
		}
	}

	}


